package com.zm.zmgz.pojo;

import com.sun.org.apache.bcel.internal.classfile.Code;
import org.springframework.context.annotation.Bean;

/*返回给前端的json对象*/
public class Response {

    private int code; // 自定义状态码

    private String message; // 提示信息

    private Object data; // 响应的数据

    public Response(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public Response() {
    }

    public Response(int code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    @Override
    public String toString() {
        return "Response{" +
                "code=" + code +
                ", message='" + message + '\'' +
                ", data=" + data +
                '}';
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
